package com.Gehaltsrechner;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;



public class EditDialog extends Dialog
{
	public boolean remove;
	
	public Button abbrechen;
	
	public String id;
	
	//Button von EditDialog
	public static Button save;
  public static Button von_datum;
	public static Button von_Uhrzeit;
	public static Button bis_datum;
	public static Button bis_uhrzeit;
	
	//Pause oder nicht ...!
	public static CheckBox edit_pause;

  public EditDialog(Context context, String name, String db_id) 
  {
      super(context);
      remove = false;
      id = db_id;
       
      setContentView(R.layout.editdialog);
      setTitle("Edit");
      
      save  = (Button) findViewById(R.id.save_edit);
    	abbrechen  = (Button) findViewById(R.id.abbrechen_edit);
    	
    	//Button inititieren und werte setzen
      von_datum = (Button) findViewById(R.id.Von_datum);
    	von_Uhrzeit = (Button) findViewById(R.id.Von_Uhrzeit);
      
    	bis_datum = (Button) findViewById(R.id.Bis_datum);
      bis_uhrzeit = (Button) findViewById(R.id.Bis_uhrzeit);
      
      edit_pause = (CheckBox) findViewById(R.id.edit_pause);
      edit_pause.setText(Sprache.pause_no);
      
    	
    	abbrechen.setOnClickListener(new View.OnClickListener() 
      {
          public void onClick(View v) 
          {
          	closeDialog();
          }
      });
  }
  
  public void onCreate(Bundle savedInstanceState) 
  {
      super.onCreate(savedInstanceState);
  }
  public void closeDialog()
  {
  		EditDialog.this.dismiss();
  }
}
